package com.aqielife.demo.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author aqie
 * @date 2022/02/05 21:58
 * @desc
 */
@ConditionalOnProperty(
        prefix = "spring.neo4j",
        name = {"enable"},
        havingValue = "true",
        matchIfMissing = false
)
@EnableNeo4jRepositories(basePackages = "com.aqielife.demo.dao")
@Configuration
@EnableTransactionManagement // 激活SDN隐式事务
public class Neo4jConfig {
}
